import {Form, Input, InputNumber} from "antd";
import {useEffect, useState} from "react";
import { message } from "antd";

const DeviceForm = ({record, formRef}) => {
  
  return (
    <>
      <Form.Item
        label="设备名"
        name="name"
        rules={[
          {
            required: true,
            message: '请输入设备名',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入设备名' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="设备号"
        name="deviceId"
        rules={[
          {
            required: true,
            message: '请输入设备号',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入设备号' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="通讯ID"
        name="commId"
        rules={[
          {
            required: true,
            message: '请输入通讯ID',
          }, {type: 'string', max: 20}
        ]}
      >
        <Input placeholder='请输入通讯ID' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="车牌号"
        name="plateNumber"
        rules={[
          {
            required: true,
            message: '请输入车牌号',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入车牌号' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="路线"
        name="routeId"
        rules={[
          {
            required: true,
            message: '请输入路线',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入路线' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="服务器"
        name="serverId"
        rules={[
          {
            required: true,
            message: '请输入服务器',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入服务器' autoComplete="off"/>
      </Form.Item>
    </>
  );

}

export default DeviceForm;